﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Net.Sockets;
using ServerPattern;
using HTA.Bluetooth;
using RobotCtrl;

namespace CommandServer
{
    public class CommandServer : AbstractBTServer
    {

        private RobotCtrl.Robot robot;

        public CommandServer(Robot robot)
        {
            this.robot = robot;
        }


        override protected AbstractBTHandler CreateHandler(BluetoothClient client)
        {
            return new CommandHandler(client,robot);
        }

        public static void Main()
        {
            new CommandServer(new RobotCtrl.Robot(RunMode.REAL)).Start();
            Console.WriteLine("HelloServer auf {0} gestartet.",
                ServerPattern.AbstractBTServer.DEFAULTSERVICE.ToString());
        }

    }
}